import request from '@/utils/request'


// 获取酒品订单
export function orderInfo(query) {
	return request({
		url: '/service/neworder/app/list',
		method: 'get',
		params: query
	})
}


// 获取酒品订单
export function winOrder(query) {
	query.orderType = 1;
	query.isDelete = 4;
	return request({
		url: '/service/neworder/app/list',
		method: 'get',
		params: query
	})
}


// 获取会员订单
export function memberOrder(query) {
	query.orderType = 2;
	query.isDelete = 4;
	return request({
		url:'/service/neworder/app/list',
		method: 'get',
		params: query
	})
}

//购物车结算
export function place(uuids) {
	return request({
		url: '/service/neworder/place/'+uuids,
		method: 'get',
	})
}


//购物车结算
export function deleteOrder(data) {
	return request({
		url: '/service/neworder/delete/order',
		method: 'put',
		data:data
	})
}




//购物车结算
export function buyWine(data) {
	return request({
		url: '/service/neworder/buyNow',
		method: 'post',
		data: data
	})
}





//撤销订单
export function revoke(uuid) {
	return request({
		url: '/service/neworder/revoke/'+ uuid,
		method: 'get',
	})
}

//是否有未支付的订单
export function expire() {
	return request({
		url: '/service/neworder/expire',
		method: 'get',
	})
}


//支付
export function pay(uuid,type) {
	return request({
		url: '/service/neworder/pay/'+uuid+"/"+type,
		method: 'get',
	})
}

//销单申请
export function refundOrder(data) {
	return request({
		url: '/service/neworder/refund',
		method: 'post',
		data: data
	})
}


//取消订单
export function cancel(uuid) {
	return request({
		url: '/service/neworder/cancel/'+uuid,
		method: 'get',
	})
}



// 获取搬运订单
export function transportationOrder(query) {
	query.orderType = 3;
	query.isDelete = 4;
	return request({
		url: '/service/neworder/app/list',
		method: 'get',
		params: query
	})
}
